package com.fit.WatchShop.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.SessionState;

import com.fit.WatchShop.interfaces.User;
import com.fit.WatchShop.interfaces.Watch;


public class WatchDetails {
	
	@Persist("flash")
	private Watch chosenWatch;

	public Watch getChosenWatch() {
		return chosenWatch;
	}

	public void setChosenWatch(Watch chosenWatch) {
		this.chosenWatch = chosenWatch;
	}
	@SessionState
	private User user;

	private boolean userExists;
	
	public User getUser() {
		return user;
	}
	
	Object onActivate() {
		if (!userExists) return Login.class;
		return null;
	}
	

}
